import Taro, {Component} from '@tarojs/taro'
import { View } from '@tarojs/components'
import { CounterContext } from './counter-context.js'

export default class Counter extends Component {
  //订阅 Context ，可以通过 this.context 消费值
  static contextType = CounterContext

  render() {
    const value = this.context
    return  <View>Count: {value}</View>
  }
}
